home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine CD 1995 / Archive Magazine CD 1995.iso / discs / prog_disc / volume_7 / issue_12 / hints / SetColour (.txt) < prev    next >
Encoding:
RISC OS BBC BASIC V Source  |  1994-06-14  |  825 b   |  37 lines

  1.  >ColTest
  2. " at line ";
  3.  C%=0 
  4.  0 : 
  5.  "X480 Y352 C2"
  6.  1 : 
  7.  "X480 Y352 C4"
  8.  2 : 
  9.  "X480 Y352 C16"
  10.          
  11.  3 : 
  12.  "X480 Y352 C256"
  13.      
  14.  4 : 
  15.  "X480 Y352 C32K"
  16.      
  17.  5 : 
  18.  "X480 Y352 C16M"
  19.  x%=0 
  20.  y%=0 
  21.       
  22. setcolour(x%,y%,0,0)
  23. %      
  24.  69,(x%<<1)+224,(y%<<1)+96
  25.         
  26.       A=
  27.  PROCsetcolour
  28.  r%, g%, b% set the amounts of red green and blue for the desired
  29.  colour, Colourtrans will be used to pick the closest colour
  30.  and set it.  effect is a standard GCOL effect field
  31.  Use SWI number for speed :
  32.  ColourTrans_SetGCOL = &40743
  33. setcolour(r%,g%,b%,effect%)
  34.  colour%
  35. !%colour%=(b%<<24)+(g%<<16)+(r%<<8)
  36.  &40743,colour%,,,0,effect%
  37.